<html>
<head>
<meta http-equiv="Content-Type"
	content="text/html; charset=windows-1252" />
<title>Nutrition Master</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../css/iecss.css" />
<![endif]-->
<script type="text/javascript" src="../js/boxOver.js"></script>
</head>
<body>


<div id="main_container">
		<div class="top_bar">
			<div  id="Nut_head">Nutrition Master</div>
					<div  class="welcome_name">
            <?php
			 	session_start();
				if (isset($_SESSION['SESS_FIRSTNAME']))
				{
					echo '<div id="welcome_username">Welcome ';
					echo $_SESSION['SESS_FIRSTNAME'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>';

				}
				else
				{
						echo '<div id="welcome_username"><a href="registration.php" class="register_now">Register Now&nbsp</a>&nbsp;&nbsp;&nbsp;&nbsp;</div>';
				}
     			 
			?>
			<div class="top_search">
			
				
            </div>
			</div>
		</div>
		<div id="header">
			<div id="logo">
				<a href="index.php"><img src="../images/logo_V2.png" alt="" title=""	border="0" width="237" height="140" /></a>
			</div>

			<div class="oferte_content">
				<div class="top_divider">
					<img src="../images/header_divider.png" alt="" title="" width="1" height="164" />
				</div>
				<div class="oferta">
					<div class="oferta_content">
						<div class="oferta_details">
							
							<div id="search_text">You could search any food items based on their Name, Brand or Category!!</div>
							<div id="search_box">
								<form action="" method="post">
									Enter the Keyword:<input id="searchKeyword" name="searchKeyword" type="text" name="sex" value="" placeholder="Enter Keyword">
									 <input type="submit" value="Search" name="Search" />
								</form>
							</div>
						</div>
					</div>
				</div>
				<div class="top_divider">
					<img src="../images/header_divider.png" alt="" title="" width="1"	height="164" />
				</div>

			</div>
			<!-- end of oferte_content-->
		</div>

		<div id="main_content">

    		<div id="menu_tab">
    				<div class="left_menu_corner"></div>
    				<ul class="menu">
    					<li><a href="index.php" class="nav1"> Home </a></li>
    					<li class="divider"></li>
    					<li><a href="rssfeed_exec.php?run=1" class="nav3">Nutritional Feeds</a></li>
    					<li class="divider"></li>    					
    					<li><a href="activities.php" class="nav4">Activities</a></li>
    					<li class="divider"></li>
    					<li><a href="BMICalculator.php" class="nav2">BMI Calculator</a></li>
    					<li class="divider"></li>
    					<li><a href="contact.php" class="nav5">Contact Us</a></li>
    					<li class="divider"></li>
			    		<?php
							if (isset($_SESSION['SESS_FIRSTNAME']))
							{
									echo '<li id ="log_btn"><a href="logout.php" class="nav6">Logout</a></li>';
							}
							else
							{
									echo '<li id ="log_btn"><a href="login.php" class="nav6">Login</a></li>';
							}
						?>
    
    				</ul>
    				<div class="right_menu_corner"></div>
    		</div>
    		<!-- end of menu tab -->
    		
    		<?php 
    if (isset($_POST['searchKeyword']))
	{
        $keyword = $_POST["searchKeyword"];
		if($keyword != '')
		{
			header('location: search.php?type=keyword&value='.$keyword);
		}
	}
?>